package cn.hyy.hrm.config;

import org.springframework.amqp.core.Exchange;
import org.springframework.amqp.core.ExchangeBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMqConfig {

    public static final String EXCHANGE_DIRECT_INFORM = "hrm_static_page_exchange";

    public static final String ROUTING_KEY = "course_home_page";

    /**
     * 声明交换机
     * @return
     */
    @Bean(EXCHANGE_DIRECT_INFORM)
    public Exchange EXCHANGE_TOPICS_INFORM() {
        return ExchangeBuilder.directExchange(EXCHANGE_DIRECT_INFORM).durable(true).build();
    }
}
